package com.yanghui.dtracing.core.opentracing.reporter;

import cn.hutool.json.JSONUtil;
import com.yanghui.dtracing.core.opentracing.DTracerSpan;

public class ConsoleReporter implements Reporter {
    @Override
    public void init() {

    }

    @Override
    public void report(DTracerSpan span) {
        if(!span.context().isSampled()){
            return;
        }
        System.out.println("tracing：" + JSONUtil.toJsonStr(span));
    }

    @Override
    public void close() {
    }
}
